<%@page import="com.baobaoyeye.get.GetInfo"%>
<%@page import="java.sql.*" %>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%
String _user_id=(String)session.getAttribute("_user_id");
String _type=(String)session.getAttribute("_type");
session.setAttribute("_user_id", _user_id);
session.setAttribute("_type",_type);
if(_user_id==null || _user_id.length()==0 || _type==null || _type.length()==0){
	response.setStatus(HttpServletResponse.SC_MOVED_PERMANENTLY);
	String newLocn = "logout.jsp";
	response.setHeader("Location",newLocn);
}
%>
<% 
GetInfo getinfo = new GetInfo(_user_id);

%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>See All Counts</title>
</head>
<body>
<p>Whose Count Bigger Than 85 ?</p>
<table border="1">
<tr><td>Student ID</td><td>Count</td></tr>
<%
ResultSet rs = getinfo.getResultSet();
while(rs.next()){
%>
<tr><td><%=rs.getString(1) %></td><td><%=rs.getString(2) %></td></tr>
<%
}
rs.close();
%>
</table>

<p>Other Information For This Subject!</p>
<table border="1">
<tr><td>AVG:</td><td><%=getinfo.getAvg() %></td></tr>
<tr><td>MAX:</td><td><%=getinfo.getMax() %></td></tr>
<tr><td>MIN:</td><td><%=getinfo.getMin() %></td></tr>
</table>
<a href="logout.jsp">Logout</a>
</body>
</html>